<?php
/*
 * Created on 11-11-2011 by Michal Piotrowski
 */
?>
<?php echo $html->link('Pobierz jako excel', array('action' => 'stats', 1));?>
<table id="stats">
	<tr id="head">
		<th>Email</th>
		<th>Siła bólu</th>
		<th>Nieprzyjemność</th>
		<?php foreach($stats[0]['Emotion'] as $em):?>
			<th><?php echo $em['name'];?></th>
		<?php endforeach;?>
		<th>#</th>
		<?php foreach($stats[0]['Adjective'] as $adj):?>
			<th><?php echo $adj['name'];?></th>
		<?php endforeach;?>
	</tr>
	<?php foreach($stats as $stat):?>
		<tr>
		<td><?php echo $stat['Survey']['email'];?></td>
		<td><?php echo $stat['Survey']['pain_strength'];?></td>
		<td><?php echo $stat['Survey']['pain_nestiness'];?></td>
		<?php foreach($stat['Emotion'] as $em):?>
			<th><?php echo $em['EmotionsSurvey']['value'];?></th>
		<?php endforeach;?>
		<th>#</th>
		<?php foreach($stat['Adjective'] as $adj):?>
			<th><?php echo $adj['AdjectivesSurvey']['value'];?></th>
		<?php endforeach;?>
		</tr>
	<?php endforeach;?>
</table>